<template>
    <Table size="small" :columns="columns" :data="orderProduct" >
        <template slot-scope="{ row, index }" slot="title">
            <span>{{row.product.title}}</span>
        </template>
        <template slot-scope="{ row, index }" slot="code">
            <span>{{row.product.code}}</span>
        </template>
    </Table>
</template>
<script>
    export default {
        name: 'tableExpand',
        props: {
            orderProduct: Array
        },
        data(){
            return {
                columns: [{
                    title: '产品标题',
                    slot: 'title'
                },{
                    title: '产品代码',
                    slot: 'code'
                },{
                    title: '数量',
                    key: 'quantity'
                }]
            }
        }
    };
</script>

<style>
    .ivu-table-stripe .ivu-table-body tr:nth-child(2n) td, .ivu-table-stripe .ivu-table-fixed-body tr:nth-child(2n) td{
        background-color: #fff !important;
    }
</style>